package dome1;
class Animal{//继承是一种思想,对共性进行抽取,父类
    public String name;
    public int age;
    public void eat(){
        System.out.println(this.name+"正在吃饭");
    }
}
class Dog extends Animal{//子类

    public void bark(){
        System.out.println(this.name+"正在叫");
    }
}
class Cat extends Animal{

    public void miao(){
        System.out.println(this.name+"在喵喵叫");
    }
}
public class Tset {

}
